from flask.blueprints import Blueprint
# from flask_restful import Api

from toutiaoapi.flaskrestful import BaseApi

# 创建蓝图 和 api实例
# url_prefix=   是路由的前缀设置
user_blue = Blueprint('user', __name__,url_prefix='/app/v1_0')
user_api = BaseApi(user_blue)

# 导入 views
from . import views

# 绑定路由
user_api.add_resource(views.Login, '/authorizations')
user_api.add_resource(views.SmsCode, '/sms/codes/<mobile>/')


# 无缓存
user_api.add_resource(views.UserInfoResource,'/user')
# 有缓存
user_api.add_resource(views.CacheUserInfoResource,'/user/cache')
